#pragma once

#ifndef OMEGAMESH_H
#define OMEGAMESH_H

#include<AlphaTools.h>
#include<fstream>
#include<sstream>
#include<iostream>
//#include<string>
//#include<GL/glew.h>
//#include <windows.h>

class OmegaMesh
{
public:
	// Easiest way to store the info.
	typedef float vec2[2];
	typedef float vec3[3];

	//Material* mat;


	GLuint vao;
	GLuint vbo[4];
	int numVerts;
	vec3 * verts;
	int numNormals;
	vec3 * norms;
	int numTexCd;
	vec2 * texcd;
	int numTris;		// Don't need seperate numTexTris, *always* the same as this.
	GLuint * tris;
	GLuint * texTris;
	//Shader *s;

	bool enabled;
	bool bumped;
	bool specMap;

	OmegaMesh();
	OmegaMesh(char* fname);
	inline bool loadMesh(char* fname){loadMesh(fname);}
	void loadMesh(const char* fname);
	GLfloat *getVerts();
	GLfloat *getNormals();
	GLfloat *getTexcd();

	///Shader* getShader();
	//void setNewShader(Shader* iS){this->s = iS;} 
	
	void display();
	void update();

	~OmegaMesh();
};

#endif